import { request } from 'umi';
import { getToken } from '@/utils/utils';

export async function getRemoteData() {
  const token = getToken();
  return request(`/api/manage/list`, {
    method: 'get',
    headers: {
      token: token!,
    },
  });
}

export async function getCurrentUser() {
  const token = getToken()!;
  return request(`/api/getCurrentUser`, {
    method: 'get',
    headers: {
      token: token!,
    },
  });
}
